<template>
	<div id="">
		<div style="text-align: left;font-weight: bold;padding-left: 5%;font-size: 20px;">
			{{nowtime}}
		</div>
	
		<!-- 搜索框 -->
		<div style="width: 100vw;display: flex;">
			<div style="width: 90vw;">
		<a href="/Search"><van-search  placeholder="请输入搜索关键词" /></a>
			</div>
			<!-- 消息 -->
			<div style="width: 10%;">
				<img src="../../../public/消息.png" style="width: 6vw;margin-top: 2vh;" >
			</div>
		</div>
		
		
	</div>
	
	
	
</template>

<script>
	export default {
		data(){
			return{
				nowtime:''
			}
		},
		created() {
			let date=new Date()
			let hour = date.getHours();
			if(hour>6&hour<8){
				this.nowtime="早上好。"
			}
			if(hour>=8&&hour<=11){
				this.nowtime="上午好。"
			}
			if(hour>=12&&hour<18){
				this.nowtime="下午好。"
			}
			if(hour>=19){
				this.nowtime="晚上好。"
			}
			// this.nowtime=hour
			// console.log(hour)
		}
		
	}
	
</script>

<style>
</style>
